package com.saac.imf.client;

import com.saac.imf.ws.service.UploadService;

import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import java.net.URL;

public class UploadClient {

    public static void main(String[] args) {
        try {
            URL url = new URL("http://localhost:8080/upload?wsdl");
            QName qname = new QName("http://webservice.upload.process.imf.caac.com/", "UploadServiceImplService");

            Service service = Service.create(url, qname);
            UploadService port = service.getPort(UploadService.class);

            port.uploadMSG("endpointIdValue", "msgValue", "msgidValue", "uptypeValue", "msgInfoValue", "uptimeValue");

            System.out.println("Message uploaded successfully.");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
